{%extends "base.html"%}
{% comment %}
Copyright 2010 Lorenzo Benfenati, Andrea Zucchelli"
This file is part of MyMovieCollection.

MyMovieCollection is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3 as published by
the Free Software Foundation.

MyMovieCollection is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with MyMovieCollection. If not, see <http://www.gnu.org/licenses/>
{% endcomment %}
{%block title%}MMC: Pool List - Page {{ pools.number }} of {{ pools.paginator.num_pages }}{%endblock title%}
{%block content%}

{%if pools%}
<div class="pagination">
	<span class="step-links">
		<a alt="prima" href="?page=1;filter={{filter}}">First</a> <span class="spacer" /> 
		{% if pools.previous_ten > 0 %} 
		<a alt="precedenti 10" href="?page={{ pools.previous_ten }};filter={{filter}}">-10</a>
		{%else%}
		-10
		{%endif%} <span class="spacer" />
        	{% if pools.has_previous %}
		<a alt="precedente" href="?page={{ pools.previous_page_number }};filter={{filter}}">-1</a>
		{% else %}
		-1
        	{% endif %} <span class="spacer" />

        	<span class="current">
            	Pagina {{ pools.number }} di {{ pools.paginator.num_pages }}
        	</span>

        	<span class="spacer" /> {% if pools.has_next %}
		<a href="?page={{ pools.next_page_number }};filter={{filter}}" alt="successiva">+1</a>
		{% else %}
		+1
		{% endif %}
		<span class="spacer" />{% if pools.next_ten <= pools.paginator.num_pages %}
		<a alt="successive 10" href="?page={{ pools.next_ten }};filter={{filter}}">+10</a>
		{%else%}
		+10
		{%endif%}
		<span class="spacer" /><a alt="prima" href="?page={{ pools.paginator.num_pages }};filter={{filter}}">Last</a>
</span>
</div>

<div class="itemlist">
{%for s in pools.object_list%}
<div class="{% cycle 'colleft' 'colright'%}">
	<div class="listitemtitle"><a href="{%url mytv.views.view_pool s.id%}">{{s.name}}</a></div> <div class="listitemelemet"><a href="{%url mytv.views.build_pool s.id%}">(edit)</a> <a href="{%url mytv.views.update_pool s.id %}">(Update)</a></div>
<div class="listitemelemet">Description: {{s.descr}}</div>
<div class="listitemelemet"><a href="{%url mytv.views.play_pool s.id%}">Play!</a> <a href="{%url mytv.views.play_pool_next s.id%}">Play next</a> <a href="{%url mytv.views.play_pool s.id%}">Replay</a ><a href="{%url mytv.views.podcast_pool s.id%}">Podcast</a></div>
</div>
{%endfor%}

{%else%}
<div>No pools defined</div>
{%endif%}


{%endblock content%}
